package com.bob.notes;

import android.app.Activity;
import android.os.Bundle;
import android.widget.VideoView;

/**
 * Created by Bob on 2016/3/23.
 * 视频查看器
 */
public class AtyVideoViewer extends Activity {

    private VideoView vv;

    private static final String EXTRA_PATH = "path";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        vv = new VideoView(this);
        setContentView(vv);

        String path = getIntent().getStringExtra(EXTRA_PATH);
        if (path != null) {
            vv.setVideoPath(path);
        } else {
            finish();
        }
    }
}
